import { Injectable } from '@angular/core';

@Injectable({
    providedIn: 'root'
})

export class AppService {

    getPhoneInfor() {
        return [
            { name: '华为P40', width: 1080, height: 2340, tmpUrl: "p40.png", top: '50px', right: '48px' },
            { name: '华为P20', width: 1080, height: 2240, tmpUrl: "p20.png", top: '13px', right: '58px' },
            { name: 'iPhoneX', width: 1080, height: 2338, tmpUrl: "iPhoneX.png", top: '11px', right: '34px' },
            { name: 'mate30', width: 1080, height: 2340, tmpUrl: "mate30.png", top: '18px', right: '73px' },
            { name: 'p30pro', width: 1080, height: 2340, tmpUrl: "p30pro.png", top: '10px', right: '74px' },
        ]
    }


    randomNumber(min, max, isAddZero?) {
        let number = Math.floor(Math.random() * (max - min + 1)) + min;

        if (number < 10 && !isAddZero) {
            number = '0' + number
        }
        return number;
    }

}